package org.firebug.spring.boot.validator.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 身份证号码验证
 * @author 张晓东
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE})
@Constraint(validatedBy = {IdCardValidator.class})
public @interface IdCard {
    boolean required() default true;
    String message() default "身份证号格式错误";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}